Test method for unit re-modification

ABSTRACT

The present invention described a test method for unit re-modification, in which there is a test end and a host end. The method generated a sample pattern at a test end, generates a control pattern and modifies a re-modification unit. Otherwise, an experimental pattern is generated and then whether or not the original function is retained after modifying the re-modification unit is determined according to the result of comparison of the control pattern and experimental pattern thereon. The present invention is used to test the internal function module of specific software or hardware, and ensure that the proper function is retained after re-modification.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a Divisional of co-pending application Ser. No.11/187,946, filed on Jul. 25, 2005, and for which priority is claimedunder 35 U.S.C. § 120; and this application claims priority ofApplication No. 093125267 filed in Taiwan, R.O.C. on Aug. 20, 2004 under35 U.S.C. § 119; the entire contents of all of which are herebyincorporated by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention discloses a test method for unit re-modification,which is used to test and improve a function module, and ensures thatthe original function is as usual after modification.

2. Description of Related Art

In the usual test procedure of operational efficiency of an applicationsoftware or appliance, the consideration of whether or not the outputreaches the expected result or improvement is the only way to determinethe efficiency thereof. Testing a specific efficiency or moduleoptimization always requires an expensive experiment, as does any otherimprovement.

It is difficult to find out the cause of memory usage, circuit layout ora variety of elements of each unit module in a software or hardwaresystem. Further, it is also hard to know whether the original functionremains after re-modification or a modification process. In particular,if the unit module in a software or hardware system is located in themidst of the system, there is no better related way to discover thecause.

The drawback of the prior art is that changes can only be observedbefore and after the re-modification or modification process, changes ofeach unit module of whole system cannot be particularly observed.

SUMMARY OF THE INVENTION

The present invention discloses a test method that generates a controlpattern and an experimental pattern before and after a re-modificationunit respectively using identical sample patterns. The patterns areintroduced to determine any change of a function module by comparing theexperimental pattern with the control pattern. Then the comparisonprocess of the method ensures that the original function is retained.

A preferable embodiment of this invention is to generate a samplepattern, and then a control pattern and an experimental pattern,accordingly. By comparing the control pattern with the experimentalpattern, the test method can determine whether the unit module retainsthe original function thereof. This embodiment can be used to test theinner functional module of software or hardware, which ensures retentionof the original function after modification.

The test method described above is used to optimize the test of there-modification unit, and comprises the following steps: generating asample pattern; inputting the sample pattern into the re-modificationunit; generating an experimental pattern; modifying the re-modificationunit and inputting the sample pattern into the modified re-modificationunit; generating a control pattern; comparing the experimental patternwith the control pattern and determining whether the unit module hasretained the original function after modification.

The second embodiment of the present invention comprises the followingsteps: recording a user operation instruction; generating referencedata; generating a sample pattern, which is generated from the useroperation instruction and the reference data; inputting the samplepattern; generating a recovery reference data; inputting the useroperation instruction to the re-modification unit; generating first testdata; feeding back the first test data to a application module;modifying the re-modification unit; inputting the sample pattern;generating recovery reference data; inputting the user operationinstruction into the modified re-modification unit; generating secondtest data; feeding back the second test data to the application module;comparing the first test data with the second test data; and determiningif the unit re-modification steps need to be repeated from diagnosingwhether the original function is retained after the modification.

Further scope of the applicability of the present invention will becomeapparent from the detailed description given hereinafter. However, itshould be understood that the detailed description and specificexamples, while indicating preferred embodiments of the invention, aregiven by way of illustration only, since various changes andmodifications within the spirit and scope of the invention will becomeapparent to those skilled in the art from this detailed description.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will become more fully understood from thefollowing detailed description and the accompanying drawings, which aregiven by way of illustration only, and thus are not limitative of thepresent invention, and in which:

FIG. 1 is a flow chart of the test method of the present invention;

FIG. 2 illustrates a sample pattern generating structure of the presentinvention;

FIG. 3 illustrates a structure of the test method of the presentinvention; and

FIG. 4 is a flow chart of an embodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

To allow the Examiner to understand the technology, means and functionsadopted in the present invention, reference is made to the followingdetailed description and attached drawings. The Examiner shall readilyunderstand the invention deeply and concretely from the purpose,characteristics and specification of the present invention.Nevertheless, the present invention is not limited to the attacheddrawings and embodiments in following description.

The present invention introduces a test method for unit re-modification,which is applied to improve the functional module of a software orhardware. The use for this test method for unit re-modification is tooptimize the re-modification of memory usage, circuit layout, module orthe elements therein. The invention adopts identical sample patterns,and an experimental and control pattern are generated before or afterunit re-modification, respectively. Then, the unit re-modificationprocess is used to ensure that the original function of the unit moduleis retained by comparing the two patterns.

Reference is made to FIG. 1, which is a flow chart of the preferredembodiment of the present invention.

First, a sample pattern is generated. The mentioned initial samplepattern is formed by a record file recording the operation instructionof re-modification of a re-modification unit of some specific product.The record file can be the instruction of a hardware, firmware or asoftware operating process; (step S11)

After inputting the initial sample pattern into the re-modificationunit, an experimental pattern is generated from the user operationinstruction and the recovery reference data (step S12).

Meanwhile, the re-modification unit is modified, with the design of afunctional module, memory usage, other related module requiringmodification or the like (step S13).

A control pattern is generated after the sample pattern goes through themodified re-modification unit (step S14).

The experimental pattern mentioned above is compared with the controlpattern; namely, the output data before and after the re-modificationunit are compared (step S15).

According to the comparison results, the invention determines whetherthe original function is retained or improved, and whether there-modification process needs to be continued (step S16).

If the re-modification process needs to be repeated, then there-modification process in step S13 is performed. Otherwise, the processis terminated.

FIG. 2 shows the schematic structure to generate the sample pattern. Aproduct is located at test end b, where a sample pattern is generatedfor the purpose of optimizing a specific functional module therein, orreducing the cost thereof.

A user operation instruction is recorded at a first record point 21, theinformation of the first record point 21 is transmitted to there-modification unit 20, which needs to be modified. Meanwhile, there-modification unit 20 is under an initial condition. The output fromthe re-modification unit 20 is produced by a reference generating unit23, and reference data are reached and recorded at a second record point25. The first record point 21 from the user operation instructionrecorded above and the second record point 25 from the reference dataare transmitted to an application module 29 of a host end a via atransmission interface 27. The transmission interface 27 can be theinterface of well-known computer host, such as RS232 or USB, forexample. The application module 29 can be the application programexecuted at the host end a. The application module 29 can be used tocompare and generate the sample pattern, the experimental pattern, andthe control pattern. Afterward, the experimental pattern and the controlpattern are used for comparison when later diagnosing there-modification unit 20.

FIG. 3 illustrates a structure of the test method of the presentinvention. The sample pattern recorded in the application module 29 istransmitted to a pattern entry unit 35 of the test end b viatransmission interface 27. The information of the user operationinstruction is transmitted to the re-modification unit 20. The referencedata is transmitted to a recovery processing unit 33, and the data aretransmitted to the re-modification unit 20 after recovery by therecovery processing unit 33.

The user operation instruction and recovery reference data are receivedby the re-modification unit 20, and then output into a data outputtingunit 39 capable of latching after processing.

The output data are transmitted to the application module of the hostvia the transmission interface of the host end a, that used to be thedata of the experimental pattern.

The aforementioned steps are repeated after modifying there-modification unit 20, and a control pattern is generated. FIG. 4 is aflow chart of an embodiment of the present invention, and comprises thefollowing steps. First, the steps for generating a sample patterncomprise the following steps. A user operation instruction is recorded,like the procedure for operating the software or hardware. For example,recording a user clicks the buttons of play, stop, forward, backward orpause on a DVD player, or a user operates the mouse, keyboard or anyother instructions in a program (step S401). A reference data isgenerated via a re-modification unit, such as video playing, buttonsoperating, and recording the reference data at a record point (stepS402). The user operation instruction and the reference data aretransmitted to a host end via a transmission interface, and a samplepattern is generated by an application module (step S403). Generating anexperimental pattern comprises the following steps. The sample patternis transmitted to a pattern entry unit of the test end from theapplication module in the host end via the transmission interface, andafter the reference data goes through a recovery processing unit, arecovery reference data is generated (step S404). The user operationinstruction is input into the re-modification unit from the patternentry unit (step S405). After the recovery reference data and the useroperation instruction pass through the re-modification unit, first testdata are generated (step S406). The first test data are fed back to theapplication module in the host end via the transmission interface (stepS407).

Generating a control pattern comprises the following steps. After thefirst test data are generated, the re-modification unit can be modifiedaccording to the module optimization or memory usage, for example (stepS408). By repeating the aforementioned steps, the sample pattern isinput into the pattern entry unit in the test end, and recoveryreference data are generated by the reference data passing through therecovery processing unit (step S409). The pattern entry unit inputs theuser operation instruction of the sample pattern into there-modification unit (step S410). Second test data are generated by therecovery reference data and the user operation instruction passingthrough the re-modification unit (step S411). The second test data arefed back to the application module via the transmission interface (step412). The first test data and the second test data are compared in theapplication module (step 413). Whether the original function is retainedafter modification of said re-modification unit is determined bycomparing the first test data and the second test data mentioned above,and determining whether the steps of the test method of the modifiedre-modification unit need to be continued, from step 408 to step 414.

Or, other test data are generated by modifying the re-modification unit,and determining whether the test method of the present invention isreached by comparing the other test data, the first test data, and thesecond test data (step S414).

Finally, by repeating the steps mentioned above, a plurality of testdata are generated, and an optimization is reached by comparing thosetest data.

In particular, the present invention discloses a test method thatgenerates a control pattern and an experimental pattern. The patternsare introduced to determine any change of function module by comparingthe experimental pattern with the control pattern, and determiningwhether the original function is remained or be optimized by comparison.

The many features and advantages of the present invention are apparentfrom the written description above and it is intended by the appendedclaims to cover all. Further, since numerous modifications and changeswill readily occur to those skilled in the art, it is not desired tolimit the invention to the exact construction and operation asillustrated and described. Hence, all suitable modifications andequivalents may be resorted to as falling within the scope of theinvention.

1. A test method for unit re-modification, the test method being used tooptimize a re-modification unit, wherein the test method comprises:generating a sample pattern; inputting said sample pattern into saidre-modification unit and generating an experimental pattern; modifyingsaid re-modification unit; inputting said sample pattern into themodified re-modification unit, and generating a control pattern; andcomparing said experimental pattern with said control pattern, anddetermining whether said steps of said test method need to be continued.2. The method as recited in claim 1, wherein said experimental patternis generated due to recovering reference data of said sample pattern anda user operation instruction.
 3. The method as recited in claim 1,wherein said control pattern is generated due to recovering referencedata of said sample pattern and a user operation instruction.
 4. Themethod as recited in claim 1, wherein said sample pattern is generatedby an application module according to a user operation instruction andreference data.